function lemonadeChange(bills: number[]): boolean {

    let number5 : number = 0
    let number10 : number = 0

    for(let i = 0; i < bills.length; i ++) {
        if (bills[i] === 5) {
            number5 += 1
        }
        else if (bills[i] === 10) {
            if (!number5) return false
            number5 --
            number10 ++
        }
        else {
            if (!number10) {
                if (number5 < 3) return false
                number5 -= 3
            }else {
                if(!number5) return false
                number10 --
                number5 --
            }
        }
    }
    return true
};
